//
//  Common.swift
//  CZWeibo
//
//  Created by 左凯旭 on 16/8/9.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

import UIKit

// 切换根控制器通知名字
let WBSWITCHROOTVCNOTIFICATION = "WBSWITCHROOTVCNOTIFICATION"
// 表情键盘删除按钮通知
let WBEMOTICONDELETEBUTTONNOTIFICATION = "WBEMOTICONDELETEBUTTONNOTIFICATION"
// 表情键盘表情按钮通知
let WBEMOTICONBUTTONNOTIFICATION = "WBEMOTICONBUTTONNOTIFICATION"
// 微博账号
let WBName = "18604598102"
let WBPassWd = "dsybs/521"
//微博相关信息
let WBAppKey = "1053385562"
let WBAppSecret = "036b1f16931a1eebb7690c8772d597f5"
let WBredirect_uri = "http://www.baidu.com"

//App Key：1053385562
//App Secret：036b1f16931a1eebb7690c8772d597f5

//屏幕的宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height


// 相当于OC中的pch文件
// 主题颜色
let AppThemeColor = UIColor.orangeColor()
// RGB颜色
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1)-> UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: alpha)
}
// 随机颜色
func RandomColor()-> UIColor{
    let r = CGFloat(random()%256)
    let g = CGFloat(random()%256)
    let b = CGFloat(random()%256)
    return RGB(r, green: g, blue: b)
}
